home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 27
/
027.d81
/
dice machine
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
578b
|
25 lines
1 rem dice machine
80 poke53281,13:poke53280,6:
100 print"[147][144]"chr$(142);tab(7);"c= dice machine - tom hyde":x=rnd(-ti)
110 input" number of dice";d
120 input" number of sides";s
130 ifd<1ors<2thenprint" ???":goto110
140 gosub270
150 geta$:ifa$="r"then180
160 ifa$="q"then260
170 goto150
180 forj=1tod
190 n=int(rnd(1)*s+1)
200 ifs>9andn<10thenprint" ";
210 printn;:t=t+n:ifj<dthenprint"+";
220 next
230 print"=";t
240 t=0:r=r+1:ifr=20thenr=0:gosub270
250 goto150
260 goto60000
270 printtab(5);"press r[146] to roll, q[146] to quit":return
60000 rem re-connect
60020 print"[147]"spc(12)"loading menu..."
60030 poke646,peek(53281):f$="magic menu"
60040 print"loadf$,8":print"run":poke631,13:poke632,13:poke198,2:end